<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>WDShare管理中心-添加招聘分类</title>
<meta name="auther" content="F7" />
<% include ../etc/htmlhead.ejs %>
</head>

<body>
<% include ../etc/head.ejs %>
<div class="manage">
  <% include ../etc/left.ejs %>
  <div class="manage-right">
    <h1 class="manage-title">招聘分类</h1>
    
    <%
      // 这一大坨代码为无限级分类，未完成，暂时用不着无限级
      var channelData = [];// 转化成数组的数据
      var mychannel;// 排列为无限级JSON的内容
      var count = 0;
      for ( key in result ) {
        channelData.push(result[key]);
      }
      // 筛选信息
      function channelScreening() {
        var cache = {};// 本次筛选的结果
        if ( channelData.length < 1 ) {
          // 完成筛选
          return false;
        }
        if ( !mychannel ) {
          for ( var i=0; i<channelData.length; i++ ) {
            if ( !channelData[i].parent ) {
              cache[channelData[i]._id] = channelData[i];
              // 删除数组操作
            }
          }
          mychannel = cache;
        }
      }
      channelScreening();
    %>

    <div class="manage-module">
      <form id="js-jobChannels-create-form">
        <!-- <input type="hidden" name="id" value="" /> -->
        <div class="manage-module-head">
          <h3 class="manage-module-title">添加招聘分类</h3>
          <div class="manage-tool">
            <input class="green" name="submitbutton_head" type="submit" value="提交"/>
            <input class="gray" type="reset" value="重置"/>
          </div>
        </div>
        <div class="manage-module-con">
          <div class="manage-addActive-form">
            <div class="manage-addActive-form-item">
              <label>
                <strong><em style="font-size:26px; color:#f00; vertical-align:middle; padding-right:5px;">*</em>分类归属：</strong>
                <select name="parent">
                  <option value="0" selected>请选择归属</option>
                  <option value="1">招聘分类</option>
                  <option value="2">企业领域</option>
                  <option value="3">企业规模</option>
                  <option value="4">公司发展阶段</option>
                  <option value="5">工作年限</option>
                  <option value="6">学历</option>
                  <option value="7">招聘类型</option>
                  <option value="8">工作城市</option>
                </select>
              </label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong><em style="font-size:26px; color:#f00; vertical-align:middle; padding-right:5px;">*</em>分类名称：</strong><input type="text" name="name" /></label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong><em style="font-size:26px; color:#f00; vertical-align:middle; padding-right:5px;">*</em>排序：</strong><input type="text" name="order" value="10" /><span>仅限数字，数字越大越靠前</span></label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>描述：</strong>
              <textarea name="description" cols="30" rows="10"></textarea></label>
            </div>
            <div class="manage-addActive-form-item manage-form-but">
              <input class="green" name="submitbutton" type="submit" value="提交"/>
              <input class="gray" type="reset" value="重置"/>
            </div>
          </div>
        </div>
      </form>
    </div>
    
  </div>
</div>

<% include ../etc/foot.ejs %>
</body>
</html>